Add option for minimum width and restructure code.