Added multiple function input. Added nested functions. Made inverse functions work.