Code cleanup and almost fixed suffix handling