REST interface is now implemented with using argument rest.
Also refactored the project.