resources refactoring
Server more complex - keep connection