Updated to include tests for all the problems fixed by the last changes to