CONN-560 cleaned up code