Cleanup + docstrings + modification to timestamp handling