Format.
Modify constructor to handle directory correctly.