Cleanup and fix code style
[SIM] Updated SIM_IO
added SIM_PTYPE enum