Adding autosize fix and some coding style extra cleanups

Hopefully :rocket: