Added support for custom APS attributes
Added content_available support
Code cleanup