package improvements, added cmd line opts