Added complex object support to entities