Minor fixes, resolving global scope