Refactor and apply a bit of shininess to profile.