Arranged to use less commands for ease of debugging.