Some Code Cleanup