Fixed up JSON and added DB connection