add .gitignore file
Simpler cleanup

Just mark the thread daemonic. Not very nice but works better
Unused import
Better variable scope for REPL

Only define global dict for exec and eval
Useful utility function
Start listening again each time after connection is closed
document strings and so on