Addedprefix and postix to formatting; Improved formatting slightly for optional masks.