improvements on VariableVertex and FunctionVertex classes, changes to MaxSumVertex abstract class