Order of parameters on functions get/put

Acording to documentation, functions get/put doesn't receive the $mode param first. Changed to optional and moved to third index.