Sortmerna api

App controller + accompanying unit tests
you're right, should be a flag.