[attributedlabel] Improved code

Please refer commit logs for each change!