Add status in header. Add a command line interface. Improve connection handling