Initial cleanup work for checking scope