Switch ContextResult to an abstract class

Also cleanup some issues from code review