REST API improvements and bugs

* Bugs fixed
* Improvements performed
* Some solutions added to be improved in the near future