Switch to bytestring for efficiency
Add functions to deal with links file
Add comand line option to process links file