Removed manual entries of functions and made it dynamic.  Added an additional error.