I tried to implement it as a plugin, but everything is too tedious + string processing methods are not public. I will make changes to the original code. This commit is for history/