improving UI and fixing encoding bugs