Refactor container part of Module and Runner classes