Further factored the music code