Refactoring, cleanup and more Closure