Updated QueryBuilder and small ui fixes