Some improvements : optimisations, factorisation

Hi man, I was happy to find your j application on the ruby documentation ;)

- Add few factorisation (ternaires, environment)
- Avoid errors on arrays (better check before using [])
- optimise some lines (size is better than count, using few adapted functions)
- remove jot and use it like a link (file shouldn't be a doublon)