Implementation of and fixes to size classifier

This commit also outlines a specific stack-based approach to dealing with section headings that will form the basis of future implementation.