Add Annotate and Sample download; some refactoring