Resolving test scoping issues and adding more tests.