Replaced variables

Variable assignment replaced with object function calls