Move stuff around and slight cleanup