Renamed pkg to new format. Completed all functions.