Updated notes, added democode