Encapulate board functions into a class

Moved board funcitons into a class in order to simplify the solving
process to come.