Moved Trial code into its own package