Added view
Some refactoring