Renamed variables and methods and fixed null byte chunk created in fromBin