Guided by http://ruby.railstutorial.org/ and Michael Hartl