refactor views, assets and controllers