Rearranged order of code and cleaned up to comment out old tests