Refactored user repo for DRY purposes, updated comments