Fix set_valid, minor rearrangment of annotation.jl