Moving all code to profile directory. Fixing merge from 7.22