general code cleanup; separated initbpm and bpm.

--HG--
branch : 2.0