Refactor to use each_key, remove extra spaces
Send paths argument as an array rather than converting it internally