Cleaned the js a bit