Please add some comments about what those variables are, especially that smallWidth being greater than minWidth makes it not intuitive.