Improved piece control
Added recursive line checking