Database optimization

0a0f64b is very negligible - just automatic whitespace removal
07f4231 Makes database fetchAll() call use PDO::FETCH_ASSOC: this will reduce network usage by about half and memory usage for the data by about half as well.