Added better handling of nested paths and small refactors.