Adapted batman.lua to be more generic