Javascript cleanup in autogrow plugin