Rework design. close #34 close #59