Various Code Improvements for Added Stability

I've made these improvements pending some bigger shifts.