Fix local/global name conflict
Whitespace
Bugfixes