basic timeshift support and some code cleanup

this adds basic timeshift support (just a large file for now, no ringbuffer/round robin yet).
additional I've cleaned up the code quite a bit.