Major refactor, need to add test to the loadbalancer