added more tests and modified template views