added a configuration variable for posts_per_page to limit number of posts displayed and response time of the database. Also, fixed an issue with the j iterator needing to be > not >=