First commit. Init and checkpoint function