Code Updates

Reworked the code to increase performance.  Learned some new stuff.