Moved Fortune's algorithm to its own file.