updated notes and tidied up some of the deck code