Refactoring, remove unused code
Try to little speed up start-end of recording