Refractor & add some control methods