Bug with time intervals fixed. Documentation is added.