removed stuff from init and put it in the main file