Minor package refactoring & bug fixes