changed socket events, updated JS for colors