Adding alternatives for class-name and code attributes. Changing remove and writeattribute handlers to restart the parent. Adding more tests.