Autospanwer logic clean up