Making AssemblyScanner more generic so it can be used elsewhere, closes #1601
Fixing a few unit tests