Factored out commands into individual methods to reduce "block syndrome".