Refactor to be more dynamically created and less manually fiddled with
Refactor into separate files