Started implementing Repository in a better way (just started, doesn't work yet)