Priority changes

This is a set of patches for discussion. I think that it's the way, how the input priority and client weight should be handled.