worked over the state logic so it's much better and duplicates the sharpe calculator much more closely.  some style tweaks also