Capped max beat length at 32. General refactoring.
Merge pull request #2 from StevenRispoli/beatLength

Capped max beat length at 32. General refactoring.