Listen to onhashchange events and change pieces accordingly

This would allow people to ask for #tango to get the first piece which
has any substring 'tango'.