Cleanup of code - remove predelcared variables