included server-side pagination, removed unwanted code, promisified the
ajax request and major improvements.