Refactored board drawing; both parts now work properly