Cleaning up state package visibilities and singleton constructors.