simplify Pueblo PB handler by replacing arrays with lists
minor fix of error message
optimize Pueblo PB handler a bit