Remove excess code and fix coding style.