Added a function registry
cleanup of unused method