Fixing tests (mismatched returned values and index values), fixing starting point
Fixing offset end and calculations