Adding Alpha-Beta search functionlaity and some refactoring