server: adaptation, part 1
client fixes
server: refactoring continue
server: another fixs
server: fixes
server: refactroing ended
server: replace server.js
Merge pull request #2 from Dydka2/endofserverrefactoring

Server refactoring