refactored _createContainer and updateWidth a bit