fixed service module
cleanup query
fixed broken test