Add Paddle class and fix some build bugs