fixed some errors and added daemon commands