clean up. scala style. go through specialization. prefer apply and update over get and set in var