Finished SIM-4, added some small changes as part of SIM-5