fixing #1868 Misc accumulated fixes

Added fixes to their new file locations and added a small fix for a failing test
This variable doesn't seem to be used any more.