[task2] - several fixes in architecture and REST