minor cleanup of code