add function mostly working. Fresh install now sets up the directories correctly