Fixed ordering

Change-Id: I550f5759f1d5b7159a26e6fe83ea0b1704d8f13b
Separate out packages into own class

Change-Id: I9c0fb024496414e9de70b6b57e7f2158ca8c9de7