Fixed some allocation issues. Added ability to change b value.