Updated documentation for Model and Simulator
Memory leak fixes