Add caption text, refactor, add/revise comments