Refactoring by seperating server entities into modules