Move some packages around; optimize imports