extracting run containers and cleanup

- adding jsdocs for all exposed functionality