On buildings and their applications