Making 'partition' function into its own module; introducing 'partition' script