Added Peter Luschny's larem and made cmpabs a friend function.