Added more profile logic and some initial form processing