Stability fixes, directory creation, events handling WIP