Added original source code based on Hamigaki 0.41.0