Moving volume calculation code to separate file for reusability. #52
Minor cleanup.