Silence misc. compiler warnings, add type safety