mainV1.3

New version of the main with some testing code in it