mostly finished logging changes on server, cleaned up and formatted