Rebased, for merging into ikuturso.