vtop: some more cleanup, proper error returning, generalization