[code style] make static fields final
[code style] don't unbox unnecesarily + use stringbuilder instead of stringbuffer where possible