Added controller code and preprocessing middleware