Main controller added; postgres being used