Add this to sort arraybuffers
Added password db type
Debug template creation func