Get rid of @SupressWarnings and also make sure we always use power of two where it matters