Cleaned up, added time array creation