Switched to adapter instances, much cleaner code.