Reorganized code and simplified UI