Source Update

General cleanup and Optimizations.