style: cleanup & simplify code