Rename maybe arguments and expand flatten functions

 - Add missing reference to flatten tests file.