some cleanup of js