Restructured the code - trying to get the callbacks in order now.