Convert direct stack manipulation to simple and cheap event writing. Draw rudimentary frame times graph. Related to #412