Moved error callback
Removed some test code