Moved variable declaration into a more feasible spot
Resolved ambiguous function name