Added a full but simplistic example of writing a state module