Improved style application on acnhor element, added debug, change log calls to debug appropriately