wip client logic, reorganized json classes