Removed old testing code and fixed duration bugs