added functional; morphism instance of valid; removed Valid.hs (use Helper)
now removed valid