Main function reduced to more smaller functions. Improved code readability.