Some minor fixes, removed PHP-level type testing; let the keys do their job