Now returning stdObject instead of array
Added custom exceptions