Flanagan visits Frederick, Walkersville, and Baltimore