Added protodefs for listFiles and some small fixes