Checking for status in JS
Memory use improvements.