directory refactor

Signed-off-by: Andras Mitzki <mitzkia@gmail.com>