implementing mix-ins for pagination + some JS hint cleanup