Performance improvements and removed unnecessary string declarations.