Added unit tests for Adding and Indexing a View
Several Refactorings to comply by the coding guidelines