kinda got scalar version of prog5 working, also cleaned up the prog5 source and broke it up into 5 files, from 2