Converted main function into a testbed.
Merge