Fix identation and style, change SecurityManager to not have the global variables