Move package parsing functions to package module