Add autolinking and refactor split method