Refactoring
Refactoring complete, REST API is fully implemented and seems to work
well.