Separate program into different packages

Also update a few classes, comments in a few files, and imports.