Implemented a dir function for relevant classes