Code review changes including fixing some naming errors and adding test check conditions