Refactored getArea function
Refactored logInfo function