Changes folder structure from views to components and fix broken tests
Refactored preview code and updated to use new component folder structure