More error handling and function call validation
Merge