Refactoring to not use CastLog