Remove undefined joint and shape types. Remove P_ prefix from shape types for consistency.