added setColumnCount() method
Unnecessary checks removed.
Constant extracted.