Add directory parsing, change handling and socket messages