added the static keyword & fixed a bug with calling some methods statically (the encoding var is now a class constant).