Make code dryer and add foundations for user profiles