Set some method to const, improved conversion between enum and int64_t