Segregated server code

used require in built module