Slight Performance Improvements

Moved variable declarations to be outside of the Insert() function.