Implemented init

Implemented init event and splited file