Inserted encoding utf-8 and detached entity functions from player