Add Add(), Remove() and Compact() methods, and a bunch of subsidary functions.  Compiles but runtime tests not yet written. This was much more involved than I envisaged...