massive code rework, styling