Checkmate a little buggy
Fixed checkmate, implemented all non-edge functionality
separated into diff files, first refactor
Second refactoring