Refactor start function