Added clean option for keeping or removing function declarations.