Complete chess implementation. Refactor begins