New dispatcher and code formatting