Improved learning & cleanup