Removed lines where not needed and improved package loading