Add sources field in packages for easier plugin declaring.
Seperate parsing and building logic into separate files.