Rewrote getServiceOrders() and fixed some errors