clean up code. tests fixed. attributes work well now.