Cleanup R# code issues