[triv] code cleanup