Updated error handling, some fixes based on schema definition