Fixed errors
Time for more optimizations