code refactoring

prepping for merging client/server

Signed-off-by: Russell Stephens <Russell@Russells-MacBook-Pro.local>