leveraging c#6 (preview) features and some subsequent refactoring.