Use wp_send_json() over echo json_encode()
Refactor the sidebar builder completely and improve ajax response
Introduce function to fetch registered sidebars
This will be better for core-functions
Refactor the sidebar JS script and updated pot