Added some exceptions, advanced getters in repositories, etc.