Removed hardcoded closure config, added template, added external closure library