fixed implementation of random selections, minor overhauling of
repository methods structure