Add properties, cast and function