Fix globals, clean up