Refactor. Added tests. Created the Board class and some Exceptions.