commit after lesson

Same functionality, just a reorganization of code and changes to some
variables.