major updates and refactoring from server. Mostly cleanup of deck and remote code.