Replaced crappy testing code with some working nice code.