Made resizing check work for individual elements. And added some comments, and changed the return object's structure to be more helpful.