Optimized

Class got optimized so it also works with OS X