Remove repeated suffixes, add border support