Minimising the spread of residence-time distribution for flat and heaped powders in a wedge-shaped planar hopper