Base methods size penalty calculation

Created base methods and test class. Implemented size penalty
calculation.