Added profiles area and permission profiles.
 Some small clean-up and small fixes.