Fixed SQL, connections, generator. Could not fix Ajax...still...