changing all Init to init,
fixing handlers,
fixing db reference