Refactor and improve threading for sidebar reload