fixed typos, variable naming, and padding concerns