Re-wrote plugin to work with hash change event