remove unused code and style fix
refactor method render
various tests