moves excerpt related functions to a separate file