Support for multiple custom functions

Uses an iterative approach by just naming new functions sequentially to avoid clashes (e.g. `New-Function-n`, where *n* is the index of the new function. Before, pressing "New Function" would just overwrite `function["NEW"]` (which was my fault). Each new function should now be independent, though renaming still needs to be implemented.