Selection class tested, bugs ironed out