Code Cleanup to be more standard C#