Added comments and timing debugging

Commented the entire file and fixed timing debugging and added timing testing