Added Agent model and MySQL functionality