Added getByKey to BlocksRepository