Move reload logic into script