Began cleaning up code and adding necessary functions for user agent cycling