Seperate board into another file
refactored code following the review comments