Refactor the simulator main function
Enable direct video rendering