Began work on automatically selecting common base, seems to still work when no base is found and has to be manually selected. Base is now selected last instead of first as a result.