removed stale code, cleanup package detection code