Updated with some Resharper edits