cleaned up console javascript, tweaked reconnect