Refactoring, and finishing server up from last week