removed unnecessary code
added some comments
removed verbose output mode
added auto detect alpha mode in advanced attributes