After months of work, finally added a working settings tab. Removed the Ajax code, replaced by a standard POST & PDO method.