Misc Code Cleanup