Update of fr code to include rudimentary plotting