Added State pattern and moved Test directory