Optimizations + hashlookup