Complete basic estimation feature.
Refactor some jobs into function.