Removed redundant sutraction from A and b matrix calculation.