Cleaning up to make configuration easier

I'm planning to refactor the script into multiple files and a
configure script, which can be run to add/remove segments.
This will make the entire thing faster and make it easier to
create new segments and themes.