Fixed typo
Removed extra resizes
Conformed to DOM writing, reading only in specific methods