Finalized L2 CTD functions and test