Bug fixes, improve block return, library variables to high ram