Added Init, Update and changed main