Reorder stuff and moved codes