Refactored preview code and updated to use new component folder structure