Although i don't feel this code is appropriate to upload to hawkee, i think you guys might enjoy it.
http://pastebin.com/m6f6f261e