changed some back ends to implement comparable, added the main class