First pass at cleanup of existing code for TRN-333.