refactor and simplified views, impl index