Fixed views. Added and fixed tests.