Cleaned unnecessary files, sped up queries

Found a bug that greatly slows queries as the batch size increases. Got
rid of this, along with many files that weren't in use, mostly in the
static folder.