Bug fixes & client/server development

Fixed some bugs, begin client/server development.