merge

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@937 c0027639-9190-0b57-01eb-f09a03790dae
fixed memory leaks and cast away const that could have resulted in problems

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@938 c0027639-9190-0b57-01eb-f09a03790dae
Merge branch 'git-refactor-modelgen' of github.com:AndySomogyi/roadrunner into git-refactor-modelgen

git-svn-id: https://roadrunnerlib.googlecode.com/svn/branches/refactor_modelgen@939 c0027639-9190-0b57-01eb-f09a03790dae