Fix rules and update packaging