Added save model functionality
Added session handling functions
Last changes for the sessions