Placed dispatcher test cases and execution inside main() function