moved server runner to a thread, added stop and isRunning methods to fix
issue #1