Add reset of internal variables