Refactored rule controls refreshing code (divs were collapsing after every data update)
Some small fixes
Fixed styling + event issues