Updated for latest master (explicit integer types)