Removed instanceof infavour of the regerstration file scan.
This should give some small speed improvements, but might cause more time.