Fixes a few smaller issues. Reduces warnings.