Wrote "callback hell" macro and fixed a few bugs.