Made some final fixes + changed back mysql connector to be static (it
was opening too many connections)