Fixed clear button behaviour, tidied up some javascript

Addresses [TRIBS-54](https://dsdmoj.atlassian.net/browse/TRIBS-54) and also the issue Max found where the advanced filters show/hide behaviour was broken after using the radio buttons and pressing clear.