Slight re-org, remove first inefficient implementation