Some improvements

This fixes some issues I saw on first sight of the repo.