Adds a package file and fixes some functions.