lint fixes and better return statuses