Renaming filenames and some fixes in algorithms.