Clean up and made sure pvcore compiles as standalone