Init variables

Replace init variables in operations
was - getLastElementInStack(); stack.pop();
now - stack.pop();