Safely wrapped everything in a closure