Convert before queue to Qmap
Run before methods for command tasks
Merge branch 'before_fix'