Fixed some bugs. Added score mechanism.