Tidying up code for profile.