YARD friendly code generation

@jarib Specs now pass. I had to remove some attributes from generated interfaces because they overwrite some element methods. Please, review code.