Added dB connection to views and controllers