refactored views, added preload files for db