Optimize viriable name and change errors definition to tuple