Remove (declare (special ...))s and fix byte-compilation warnings