Use functional style file organization

Reorganized modules to follow a functional style. For example, forms now live
in the forms directory. Routes live in the routes directory, etc.