Load distributions objects sorted
Sorting distributions in the controller before passing to the view (edit action)
Using hidden field instead of hidden flag
Use instance variable
Removed reset methods, when switching between tabs
using any? instead of count