update class structure, variable names, css style