Rebuilt. Added documentation.
Removed warning about order of operations.