Revision

Made major modifications to tutorial code