Added begin/end functions.