Removing sql & cleanup