Fix in some output types, some repetitive functions are commented out, and new, more thorough, tests