Initial repository class.
Exceptions and repository check