pravtor: cleanup & some bugfixes