Variable Reformatting and general fixes