small fixes in registration; improve templates