Fix rotation, add keepalive, fix timer bug