Max sizes function added.
Merge branch 'develop'