performance optimizations

phoenix can be a bit sluggish - this branch is for improving performance