Cleaned up and fixed missing encoding