Clean up some stuff in utils

Just some code clean-up I did while debugging a connection issue.