Added score and fixing minor bugs