Finish helper functions and procedures.