Remove extra global/new calls, use object and setUp to reduce lines