Added FSP, updated math functions to deal with nil lists