Fixed charset problem and cleaned up code a little