Rework rest handler
Merge pull request #37 from b0oh/rest

Rework rest handler