Refactored out components into separate files