Refactor the haproxy to work a little nicer