a bit of a refactoring in views and models, added payment type field