Fixed the coefficient bug
works with negative numbers now
a few minor changes
Merge branch 'TobinBugFixing'
fixed merge conflict