Fixed callback bugs

Fixed bugs with callbacks, I couldn't seem to use U8 correctly in script
for some reason, but S32 works. I may have needed to use some extra
operators or something maybe, it was so long ago I can't remember what I
got in script as it was so long ago.
Also removed some unused code.