Fixed null pointer exception, removed package defs