Added a hidden clean function for debugging purposes. Additionally, it would appear that the directory changing function has been fixed.