Added code for the stats view and form