Clean up Repo class with better code