Basic LB handling. Can probably be cleaned up once I'm more familiar with Ruby syntax