restructure files
refactor out business logic and presentation logic