Added .gitignore and sliced nulls from end of hostname string.