Since the program isn't complex, move everything toplevel
Update documentation with usage example.