Moved timestamp creation into it's own function, added tests for timesta...

...mp creation