Reworking AA html into more useful framework, work in progress...