Improve directory organization

In place of app/models, we now have app/entities, app/repositories,
app/services, and corresponding spec directories.