Refactoring and renaming

Cleaned up the code.  Starting cycle generator.