Update pkg dependencies and begin modularizing further