add tests for dynamic attribute rendering; fix various bugs with attribute creation