Beginning code perf improvements