More work on abacus, basically done except for a few helper functions and more unit tests