Refactored variables to match Go convention, added additional error handling for MySQL query