Refactoring
Update code for using static comparison functions