Added better registration mechanism