Update views, add phase model, add writecsv.rb