Fixes to implement missing functionality

the commit comments should be sufficiently detailed to explain each change