Code refactoring: refactor views and service objects.