Package reordering and some minor things