Improved callback stuff, solved some bugs.