Removed the listener thread. Implemented better exceptions. And stuff.