finish manual config mode. also other optimizations and error fixes