remove warnings
add carp/vhid support
reduced magic numbers