Test coverage improvements

Plus dead code removal / deduplication

The getValue thing is up for discussion though.