expands the specs to cover all functionality

and cleans up logic where it was less than ideal