Links almost working. Error checking needs to be refined.