Song: cleanup and coding style improvements