Fix ordering; move minus-ps and minus-qs from layers to the graph