further reorganisation, Types.h is now in detail and main uses only C_API