Fixed a *very* strange bug where code was duplicated, fixed bugs in init scripts