Minor fix + cleanup

- Fixed issue with undefined duration and type
- clean up the console.log's scattered all around