Sortmerna api

App controller + accompanying unit tests
Move this global definitions to the end of the file (just before the if main