Applied some R# suggestions

Signed-off-by: Martin Evans <martindevans@gmail.com>