Refactoring functon table functions