cleaned up new JavaScript