fixing cyclic dependency
made main app a separate thread
removed exceptions, they're unnecessary