Fixes to formatting and add setpre