Add invest functions; fix documentation