clean up codebase, add support for path finding