Reverted to previous Main.  Consider refactoring later.