Small server.py refactor

- Docstrings added
- Helper method added to get project and resource objects from Rope library
- debug moved to decorator mdoule