Refactoring and added score panel.