Added many necessary procedures, and updated a few old ones.