Draining attributes in structures

This is so that @cyli can work independently on implementing the algorithm while I work on filling these structures.
Yeah.. I am sorry for all this discussion. You are right. I'll add that