Clone Sparta-mode from PHP version