Update 3/11
Complete design, checking possible bugs and optimizations.