added views, refactored core