Add popBack
Fix index calculations
Better namings