Miscellaneous changes pribarily in the misc package