Made note/time signature code more robust.