Fixed generator, added pages controllers and routing