Refactor - global variables

letoln.cpp and amtoln.cpp using global variables.