Made further tweaks; got rid of dependencies on controller.