Refactored client-side javascript
Added styling for selected button