Minor refactoring for line clearing and scoring

Code needs massive refactoring!