Stripped off code to keep only the main package