Updated code. Stuff works now :D