Moved constants into a time signature object.
Clarified comments and made sure to use integer division all the way through.
Removed useless import.