giSecurity adaption for giQuery + cleanup