Begin to implement server, create input thread