Integrated code, removed redundant variables, encapsulated call.