Added support for max number of items; fix index.html