minor cleanup and var rename