some renaming and added basic server functionality