Reduce platform.h. Use cstdint. Use double slash comments.