Add levels

Using a switch, level will change when all nodes have been visited. It
works, kind of. Need to somehow stop it from moving forward in the
cases.