cleanup error message
refactor selection of selector type
close #4