More tests and directory refaction