added support to set dynamic groups position(order)
Simplify group position a bit

Closes #352