Refactor code and add in synchronizing indicator