more business layer tests; fixed some bugs