Initial upload of some code used in tutorial sessions.
TODO: Comment matrix code for future tutorials...