Refactoring init file to work