Add type declarations for all functions