Performance: major speed boost

Performance: added index to some computationally intensive data
structures, fixed broken links, etc