Added starttime and fixed some bugs. WIP