Refactor on BoardLayout class