make this module lint happy

please note that some of the parts of this patch fall into the same vein
as #89, in that it removes if or case statements, in favour for less
indentation, easier to read code, and, of course, to make the linter
happy in cases where there were selectors in resource declarations