Ok, cleaned all that up. Also moved the factory class up, and realized that max_attempts wasn't really used.