Some refactoring: now using Slim Views for rendering and tidied up some code. More to come...