removed server related code, refactored to node module