Fix null reference error
Change PACKAGES to packages and clean up CMLCore