refactored server-side code, removing unused features