Wrap permalink coordinates
Refactor search JS
Hide search marker/object when closing sidebar

Fixes #417