Updated frontend and query handler