Backend refactoring
Refactoring fixes
Merge pull request #41 from Atlas-/refactor

Backend refactoring