Cleaner implementation of Path constructor