Completed main parts of sim