Basic server code, removed some junk and corrected couple typos