Added variable functionlity in views & model functionality w/ db connection