Miscellaneous Code Cleanup