Fix profile! and add some declarations to reduce consing.