Refactor variables declaration