Move clear() to helpers, update commenting