Updated function outputs

Changed all outputs to include a bool if it was successfull or not.
Also made the examples more advanced.