Generic function and default method for termination.
Renamed file to conform to general naming convention.
Removed useless blank line.
Added missing parentheses and defined general expansion function.