Set up packaging and fix build warnings