Reorganise init, fix couple other things