Fixed rewriter for view
Styling improvements and general module refactoring