solving an initial state problem and more clean up