Removed global refs where not required