Reorganized the main screen plus some bug fixes.