Add simple timebase.

Add simple timebase.
Add preparing to recording.

Add preparing to recording.
Make some refactoring.

Make some refactoring.