Refactor with init-loader

fixes #20 #12 #2 #9 #10