join query together
clean up code and documentation
re-organize dependencies