Improved profile
Fixed profile template
Refactored code