Added package test and fixed issues