Removed commented and redundant code and added specific logging of data structures to a separate log file.