Added position attribute. Fixed Repository methods