Kleene algebra with tests (KAT) is an equational system that combines Kleene and Boolean algebras. One can model basic programming constructs and assertions in KAT, which allows for its application in compiler optimization, program transformation and dataflow analysis. To provide semantics for KAT expressions, Kozen first introduced automata on guarded strings, showing that the regular sets of guarded strings plays the same role in KAT as regular languages play in Kleene algebra. Recently, Kozen described an elegant algorithm, based on "derivatives", to construct a deterministic automaton that accepts the guarded strings denoted by a KAT expression. This algorithm generalizes Brzozowski's algorithm for regular expressions and inherits its inefficiency arising from the explicit computation of derivatives. In the context of classical regular expressions, many efficient algorithms for compiling expressions to automata have been proposed. One of those algorithms was devised by Berry and Sethi in the 80's (we shall refer to it as Berry-Sethi construction/algorithm, but in the literature it is also referred to as position or Glushkov automata algorithm). In this paper, we show how the Berry-Sethi algorithm can be used to compile a KAT expression to an automaton on guarded strings. Moreover, we propose a new automata model for KAT expressions and adapt the construction of Berry and Sethi to this new model.