More code refactors. Added search by class code.