Started working on some optimizations