Started work on proper middleware use.