Rewrote to fit daemons and updated scripts