Remove extendedapi.lua

Move functions into chat where they are currently used