Separated the main file into sub-files in a new directory.  Renamed main file, added a little documentation.