More repository work. Created RepositoryCode class for error & success codes.