add comments and a minor stubs