Refactored brick init code.