Fixed scrollimg behaviour and made index access faster by writing lookups