Add documentation/make return types sane