Shared EDQ functions. Initial commit