Added functionality to Set. Cleaned up tests using global.