Cleaned code and fixed bug in comment pagination.