Moving instances into repository and fixing + adding new tests