Generification of A*
State generation
New state structure