It has been an important settlement since the 14th century and was the largest port in Scotland for many years , handling Edinburgh 's cargo .
The settlement has had an important role since the 14th century .