Fixed ugly code and UI