added FilterWithBuffer to allow removal of malloc/free without losing ability to pass around filter objects