changed ads to be stored in database, various formatting changes