Simplified record keeping logic.
Fixed minor error in profiling_records.
More work on profiling_records. Quick temp unit test to verify functionality.