Finished code for crhox to crhoy, added test code.