Code reorganization (do not merge yet)

This is an initial attempt to reorganize the code base of ar-web-api. It is not ready to be merged yet. The reason that I am opening the pull request is to trigger the discussion.