Refactored and simplified Function.
Registry now supports aliases.