Reduced number of calls to callable() and other small fixes.