fatorized queries, started working on pagination, deleted unnecessary img files