Fix residual ceiling (had thought beats had duration 1, but actually 1/4)
Some bug fixes with bar checks