Implemented factorial and added fixme for group-by