Moved parseAttribute method from lib to main