Added some new types and improved performance