added a model and refactored things to suit
Merge branch 'master' of https://github.com/Tarendai/composerpress