Fix bug changing speed when paused. Minor refactor.