Several speed improvements, use FilePath at the core