Added state machine and test factories. Finished friendship model.