Changed u64 return types to i64 so we can have negative error codes. Fixed stuff, wooho. Tests on driver passed.