improved time signature handling in composer
code reorganization