remove unused code related to renderContainer implementations
fix some for loops that have proven to be an issue