main control flow, mapping frame code, comments on todo list