Fix some stuff
Add working variable block size control
Attempted optimization