Break the components into headers, refactored code