Move codes into a package