minor cleanup and explicit instantiation for fast compilation