cleaning code in server side code

- renaming methods and variables
- simplify path in require