Seems to be done.

TODO:
 - Check formulas;
 - Testing;
 - Clean code.