Use numeric for zero functions
Use filter instead of where, various cleanups