Started adding dispatch framework (WIP)