Fix top layer return; use KEYS

Returning "0" when someone's already in the top layer is misleading,
it's better to just return the top layer index.

Also: Access the base key argument as KEYS not ARGV.
f layer-check-add
f ttl
Add composer.json