initial client refactor. refactor on server is pending
Finished server side refactor