Fixed SILENT support and tests, and some minor refactorings throughout