cleaner code, some package changes