Toogle code moved to client.js