Added scoring & further refactoring