A few fixes and making things more localized