refactored cyclus.cc file into separate functions and cleaned it up