Refactor code to remove instanceof using double dispatch
Merge remote-tracking branch 'origin/master'