Validate & api carcass

Added validate functions and api carcass