Special thanks to FatMobile for getting this working and providing sources!

http://pastebin.com/raw.php?i=7m92B1M8
