Refactor, Fix bugs (ver 1.18)