Remove unused and 'very bad' global variable from CWS JS