Improving flexslider further

The code is self explaining.

Please double check second commit, there still can be some unexpected changes in behavior because until now `dimension` variable was out of scope, how this was working though?