Data Recording in progress

1. Add code for data recording
2. Reformat code style