Fix some other coding style issues
Coding style
Avoid getting profile several times