Minor changes to scope and removed unused methods.