Refactored Profile related pages

Sorry sir, This branch has both master and dev merged in. Some of the earlier commits are by Kai onto dev branch