Fix some bugs and add PUC Simulator