added started flag to server
renamed server start and stop functions
added finally blocks to socket stop functions
started adding unit tests