Optimize & Fix bugs