final cleanup of js