More cases to handle + fix spacing for union types
Little fix to module nested entities generation