cleaned up anonfun and params parsing
cleaned up anonfun and params parsing