Some design mistakes were fixed; Warning was added