GENERAL
Fixed async callbacks not always firing
Fixed potential memory leaks in async callback functions
General code cleanup and refactoring