refactor views (fixes #2)