Refactored User profile and general cleanup

- Converted looping and applying regex into a function that accepts
exception functions for exceptional cases.
- Provided more documentation and general cleanup for the Profile class.