Fixed a set of basic bugs:

Using == instead of .equals for string comparison, not declaring public static fields final, and assuming utf-8 will be default string encoding.