Feature/refactor

ref #51 #52 #53