Added bitshifts for calculating the next id
Shortening function names