Minor fixes to maxLength and added new utility functions.
getBars and getCount + putting it all together.