Sortmerna api

App controller + accompanying unit tests
You can probably take advantage of the [`set`](https://docs.python.org/2/library/stdtypes.html#set) in all the below for loops